package bb.lanxing.lib.devices.ble.x1;

import android.os.Parcel;
import android.os.Parcelable;

public class X1DisplayData implements Parcelable {
    public static final Parcelable.Creator<X1DisplayData> CREATOR = new Parcelable.Creator<X1DisplayData>() {
        @Override
        public X1DisplayData createFromParcel(Parcel parcel) {
            return new X1DisplayData(parcel);
        }

        @Override
        public X1DisplayData[] newArray(int i) {
            return new X1DisplayData[i];
        }
    };
    private double altitude;
    private short avgCadence;
    private short cadence;
    private int calorie;
    private double distance;
    private int duration;
    private short heartrate;
    private double speed;

    @Override
    public int describeContents() {
        return 0;
    }

    public X1DisplayData() {
    }

    protected X1DisplayData(Parcel parcel) {
        this.speed = parcel.readDouble();
        this.distance = parcel.readDouble();
        this.duration = parcel.readInt();
        this.calorie = parcel.readInt();
        this.altitude = parcel.readDouble();
    }

    public double getSpeed() {
        return this.speed;
    }

    public void setSpeed(double d) {
        this.speed = d;
    }

    public double getDistance() {
        return this.distance;
    }

    public void setDistance(double d) {
        this.distance = d;
    }

    public int getDuration() {
        return this.duration;
    }

    public void setDuration(int i) {
        this.duration = i;
    }

    public int getCalorie() {
        return this.calorie;
    }

    public void setCalorie(int i) {
        this.calorie = i;
    }

    public double getAltitude() {
        return this.altitude;
    }

    public void setAltitude(double d) {
        this.altitude = d;
    }

    public short getHeartrate() {
        return this.heartrate;
    }

    public void setHeartrate(short s) {
        this.heartrate = s;
    }

    public short getCadence() {
        return this.cadence;
    }

    public void setCadence(short s) {
        this.cadence = s;
    }

    public short getAvgCadence() {
        return this.avgCadence;
    }

    public void setAvgCadence(short s) {
        this.avgCadence = s;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeDouble(this.speed);
        parcel.writeDouble(this.distance);
        parcel.writeInt(this.duration);
        parcel.writeInt(this.calorie);
        parcel.writeDouble(this.altitude);
    }
}
